#pragma once
#include <string>
#include <vector>
#include "IniFile.h"
/**
* This class reads an ini file. The reader builds a map of maps stored
* in an IniFile.
* @author Koen Samyn
*/
class IniReader
{
public:
	/**
	* Constructs a new IniReader object with the provided filename
	* @param filename the filename to read.
	*/
	IniReader(const tstring& fileName);
	/**
	* Destroys the IniReader object.
	*/
	virtual ~IniReader(void);
	/**
	* Reads the file
	* @return true if the file was succefully read, false otherwise.
	*/
	bool Read();
	/**
	* Return the IniFile object.
	* @return the parsed ini file object.
	*/
	IniFile* GetIniFile() const {return m_pIniFile;}
private:
	tstring m_Filename;
	tifstream m_Input;
	/**
	* The parsed IniFile.
	*/
	IniFile * m_pIniFile;
	/**
	* A vector to store results of split operations.
	*/ 
	vector<tstring> m_ParseHelp;
	// -------------------------
	// Disabling default copy constructor and default assignment operator.
	// If you get a linker error from one of these functions, your class is internally trying to use them. This is
	// an error in your class, these declarations are deliberately made without implementation because they should never be used.
	// -------------------------

	IniReader(const IniReader& t);
	IniReader& operator=(const IniReader& t);
};
